<!DOCTYPE html>
<head>
    <title>Dom 模型 绑定事件处理器</title>
    <meta http-equiv="Content-Type" content="text/html" charset="UTF-8">
</head>
<body>
    <div id="test">
        <input type="button" id="testbtn" value="click ">
    </div>
    <br><hr>
    <div id="result">
    </div>
</body>
<script type="text/javascript">
    var gotclick1=function(event){
        document.getElementById("result").innerHTML +="事件捕获阶段："+event.currentTarget+"<br>";
    }
    var gotclick2=function(event){
        docuemtn.getElementById("result").innerHTML +="时间冒泡阶段："+event.currentTarget+"<br>";
    }
    document.getElementById("testbtn").addEventListener('click',gotclick1(),true);
    document.getElementById("test").addEventListener('click',gotclick1(),true);
    document.getElementById("testbtn").addEventListener('click',gotclick2(),false);
    document.getElementById("test").addEventListener('click',gotclick2(),false);
</script>
</html>